<template>
 <div>
    <h1>登录</h1>
    <el-divider></el-divider>
    <el-form  label-width="auto" style="max-width: 600px">
        <el-form-item label="用户名">
           <el-input v-model="loginName" />
        </el-form-item>
        <el-form-item label="密码">
           <el-input type="password" v-model="loginPwd" />
        </el-form-item>
       <el-form-item>
           <el-button type="primary" @click="login">登录</el-button>
           <el-button>取消</el-button>
        </el-form-item>
  </el-form>

  </div>
</template>

<script setup>
import axios from 'axios';
import {ref,reactive} from 'vue';
   const loginName=ref('');
   const loginPwd=ref('');
   const a=ref(10);

   const login=function(){
        axios.post("http://localhost:9090/my/ajax/login"
           ,"loginName="+loginName.value+"&loginPwd="+loginPwd.value)
        .then((resp)=>{
               alert(resp.data.msg);
        });
      }
</script>


<style>

</style>